/*
* mib_functions.h
* be sure that you have not any nodes which have the same values as described in #pragma region private_SNMP_definitions
* Created: 11-07-2013 12:53:44
*  Author: ILYA
*/

#pragma region standart_SNMP_definitions
/* universal tags */
#define SNMP_ASN1_INTEG  2
#define SNMP_ASN1_OC_STR 4
#define SNMP_ASN1_NUL    5
#define SNMP_ASN1_OBJ_ID 6
//#define SNMP_ASN1_SEQ    16
/* application specific (SNMP) tags */
//#define SNMP_ASN1_IPADDR 0    /* octet string size(4) */
//#define SNMP_ASN1_COUNTER 1   /* u32_t */
//#define SNMP_ASN1_GAUGE 2     /* u32_t */
//#define SNMP_ASN1_TIMETICKS 3 /* u32_t */
//#define SNMP_ASN1_OPAQUE 4    /* octet string */
/* context specific (SNMP) tags */
#define SNMP_ASN1_PDU_GET_REQ 0xA0
#define SNMP_ASN1_PDU_GET_NEXT_REQ 1
#define SNMP_ASN1_PDU_GET_RESP 2
//#define SNMP_ASN1_PDU_SET_REQ 3
//#define SNMP_ASN1_PDU_TRAP 4
#pragma endregion standart_SNMP_definitions


#pragma region private_SNMP_definitions
#define SNMP_V1 0x00
#define SNMP_ERROR 0xFF

static char* x = "avyui";
static const unsigned int y = 25;

#define SNMP__paramMessageID   x   //tableRMC >> entryRMC// todo:  set the appropriate variable eg. char_buffer;
#define SNMP__paramMessageID__SIZE  10    //tableRMC >> entryRMC// todo:  set the appropriate length eg. sizeof(char_buffer) or strlen(char_buffer);
#define SNMP__paramUTCTime  x    //tableRMC >> entryRMC// todo:  set the appropriate variable eg. char_buffer;
#define SNMP__paramUTCTime__SIZE 12     //tableRMC >> entryRMC// todo:  set the appropriate length eg. sizeof(char_buffer) or strlen(char_buffer);
#define SNMP__errStatus  y    //picocell >> errStatus// todo:  set the appropriate variable eg. int_variable;
#define SNMP__errStatus__SIZE sizeof(y)     //picocell >> errStatus// todo:  set the appropriate length eg. sizeof(int_variable);
#define SNMP__temperature  y    //picocell >> temperature// todo:  set the appropriate variable eg. int_variable;
#define SNMP__temperature__SIZE sizeof(y)     //picocell >> temperature// todo:  set the appropriate length eg. sizeof(int_variable);
#pragma endregion private_SNMP_definitions


typedef struct
{
	unsigned char version;
	unsigned char command;
	unsigned char err_code;
	unsigned char length_bindedVariables;//this is the zipped Variables length
	/*the pointer bindedVariables contains:
	(for command get)OID1+OID2+OID3...
	(for command set)OID1+data1_length+data1+OID2+data2_length+data2...
	(for command getResp)OID1+data1_length+data1+OID2+data2_length+data2...
	comment: the OID is only tail of OID, and its size is equal to 1byte
	*/
	//unsigned char *bindedVariables;//dont use this field
} TSzippedsnmp;
const unsigned char get_snmp_oid_last_byte(unsigned char param_ID);
const unsigned char get_snmp_object_type(unsigned char param_ID);

void get_getRespZip(const unsigned char* getRequestVarbind, unsigned char** getRespVarbind); //all Varbindes must be zipped
